package com.basic;
import com.peopletypes.*;
public class MainTest {
	public static void main(String[] args){
		EconRandom rand = new EconRandom();
		Market market = Market.getInstance();
		market.addGood(new Good(55));
		market.addGood(new Good(100));
		market.listAll();
		
		Individual i = new ConservativeSpender(market, 100);
		((ConservativeSpender)i).purchaseByCost(55);
		System.out.println("new wealth: " + i.wealth);
		market.listAll();
		System.out.println("##########");
		
		Individual j = new MiddleSpender(market, 100);
		
		((MiddleSpender)j).purchaseByCost(60);
		market.listAll();
		
	}
	
	
	public static void oldmain(String[] args){
		EconRandom rand = new EconRandom();
		Market market = Market.getInstance();
		
		
		for(int j = 0; j<10; j++){
			Good g = new Good();
			g.setValue(rand.simpleRandom());
			market.addGood(g);
		}
		market.listAll();
		System.out.println("#######");
		Individual i = new Individual(market, 500);
		i.purchaseByCost(200);
		System.out.println("wealth: " + i.wealth);
		
		Individual c = new ConservativeSpender(market, 100);
		
		((ConservativeSpender) c).test();
		
		ConservativeSpender cs = new ConservativeSpender(market, 100);
		
		((Individual)cs).sell();
		cs.test();
		
		
		
		
	}
	


}
